Prepare an ESXi Host for Maintenance
This document describes steps required to prepare an ESXi host for the maintenance. Examples of such maintenance include:
- Replacing broken/old hard drives.
- Reinstalling ESXi system.
Prerequisites
Requirements for CI admin:
- Access to Contrail Windows CI infrastructure.
- Credentials to Contrail Windows CI VMware cluster.
- Browser with Flash support, preferably Chrome.
Before proceeding with the following steps take note of:
- ESXi host hostname
- ESXi local datastore list
In this document, the ESXi host being prepared for the maintenance will be referred to as maintaned host.
Steps
- Open the vSphere Web Client and login using credentials provided by Contrail Windows CI team.
- In
Navigator
pane selectStorage
tab. - Expand
WinCI-Datastores-SSD
datastore cluster.- Identify local datastores of maintained host.
- For each such datastore perform:
- Right click on the datastore.
- Click
Move To...
option. - In the
Move To...
window, selectCI-DC
. - Click
Ok
button.
- Perform the previous step for other datastore clusters:
WinCI-Datastores-SATA
WinCI-Datastores-Infra
- NOTE: Testbeds in CI are spawned on datastores from
WinCI-Datastores-SSD
datastore cluster. Removing host's datastores from it denies new testbeds from being spawned on this host. - In
Navigator
pane selectHosts and Clusters
tab. - Expand
CI-DC
datacenter entry. - Expand
WinCI
cluster entry. - Find the maintained host entry click on it.
- Migrate virtual machines off the maintained host.
- Left click on the host entry in the
Navigator
pane. - In the main pane select
VMs
tab. - For each VM in the table perform the following steps:
- Right click on the VM.
- Select
Migrate...
option. Migrate
wizard should open up.- In
Select the migration type
step:- Select
Change both compute resource and storage
option. - Select
Select compute resource first
option. - Click
Next
button.
- Select
- In
Select a compute resource
step:- Expand
CI-DC
datacenter entry. - Expand
WinCI
cluster entry. - Select a host different than maintained host.
- Click
Next
button.
- Expand
- In
Select storage
step:- Select a datastore local to host selected in the previous step.
- Click
Next
button.
- In
Select networks
step:- Verify that
Source Network
matchesDestination Network
in the presented table. - Click
Next
button.
- Verify that
- In
Select vMotion priority
step:- Select
Schedule vMotion with high priority
option. - Click
Next
button.
- Select
- In
Ready to complete
step:- Click
Finish
button.
- Click
- Left click on the host entry in the
- Migrate templates.
- Left click on the host entry in the
Navigator
pane. 47 - In the main pane selectVMs
tab. - In the main pane select
VMs
tab. - Below
VMs
tab, selectVM Templates if Folders
. - For each template perform the following steps:
- Right click on the template.
- Select
Convert to Virtual Machine...
option. Convert Template to Virtual Machine
wizard should open up:- In
Select a compute resource
step:- Click on
WinCI
cluster object. - In the bottom of the windows, you should see
Compatibility checks succeeded
. - Click
Next
button.
- Click on
- In
Ready to Complete
step:- Click
Finish
button.
- Click
- Change screen from
VM Templates in Folders
toVirtual Machines
. - If the template is listed on the VM list:
- Perform the same migration steps as for virtual machines from step 11.
- If the template is not listed:
- It probably was already located on shared storage and VMware reassigned it to the different host.
- To confirm search for this template in
VMs and Templates
tab, inNavigator
pane.
- Right click on this relocated/migrated VM and select
Template > Convert to Template
option.- In the
Confirm Convert
windows, clickYes
button.
- In the
- NOTE:
testbed
templates should stay onNFS-Datastore
, since template location on shared storage is a requirement of linked clones. - NOTE: If enough space is free on
NFS-Datastore
, latest templates should be located on it.
- Left click on the host entry in the
- Switch host to the maintenance mode.
- Right click on the host entry in the
Navigator
pane. - Select
Maintenance Mode > Enter Maintenance Mode
option. - In the
Confirm Maintenance Mode
window, uncheckMove powered-off and suspended virtual machines to other hosts in the cluster
option. - Click
OK
button.
- Right click on the host entry in the
- Move host out of the
WinCI
cluster.- Right click on the host entry in the
Navigator
pane. - Select
Move To...
option. - Click on
CI-DC
datacenter object. - Click
OK
button.
- Right click on the host entry in the